
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module combFilter</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>combFilter</strong></big></big> (version 1.22)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/meurer/ACS/Pipeline/Apsis/apsis-4.2.4/python/apsis/combFilter.py">/home/meurer/ACS/Pipeline/Apsis/apsis-4.2.4/python/apsis/combFilter.py</a></font></td></tr></table>
    <p><tt>License<br>
=======<br>
&nbsp;<br>
Copyright&nbsp;(c)&nbsp;2009,&nbsp;The&nbsp;Johns&nbsp;Hopkins&nbsp;University<br>
&nbsp;<br>
All&nbsp;rights&nbsp;reserved.<br>
&nbsp;<br>
Redistribution&nbsp;and&nbsp;use&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with&nbsp;or&nbsp;without<br>
modification,&nbsp;are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following&nbsp;conditions&nbsp;are&nbsp;met:<br>
&nbsp;<br>
Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;this<br>
list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer.&nbsp;&nbsp;Redistributions&nbsp;in&nbsp;binary<br>
form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and<br>
the&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation&nbsp;and/or&nbsp;other&nbsp;materials&nbsp;provided<br>
with&nbsp;the&nbsp;distribution.&nbsp;&nbsp;Neither&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;Johns&nbsp;Hopkins&nbsp;University&nbsp;nor<br>
the&nbsp;names&nbsp;of&nbsp;its&nbsp;contributors&nbsp;may&nbsp;be&nbsp;used&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products<br>
derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;specific&nbsp;prior&nbsp;written&nbsp;permission.<br>
&nbsp;<br>
THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;THE&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;AND&nbsp;CONTRIBUTORS&nbsp;'AS<br>
IS'&nbsp;AND&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED&nbsp;WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED<br>
TO,&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR&nbsp;A<br>
PARTICULAR&nbsp;PURPOSE&nbsp;ARE&nbsp;DISCLAIMED.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;COPYRIGHT<br>
HOLDER&nbsp;OR&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;INDIRECT,&nbsp;INCIDENTAL,<br>
SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED<br>
TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA,&nbsp;OR<br>
PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY&nbsp;THEORY&nbsp;OF<br>
LIABILITY,&nbsp;WHETHER&nbsp;IN&nbsp;CONTRACT,&nbsp;STRICT&nbsp;LIABILITY,&nbsp;OR&nbsp;TORT&nbsp;(INCLUDING<br>
NEGLIGENCE&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT&nbsp;OF&nbsp;THE&nbsp;USE&nbsp;OF&nbsp;THIS<br>
SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMAGE.<br>
&nbsp;<br>
(This&nbsp;license&nbsp;is&nbsp;based&nbsp;on&nbsp;the&nbsp;BSD&nbsp;license<br>
&nbsp;<a href="http://www.opensource.org/licenses/bsd-license.html">http://www.opensource.org/licenses/bsd-license.html</a>)</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="fUtil.html">fUtil</a><br>
<a href="numpy.html">numpy</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="pUtil.html">pUtil</a><br>
<a href="popen2.html">popen2</a><br>
<a href="pyfits.html">pyfits</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
<a href="subprocess.html">subprocess</a><br>
<a href="xmlUtil.html">xmlUtil</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="combFilter.html#detectionImage">detectionImage</a>
</font></dt><dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="combFilter.html#detectionImageError">detectionImageError</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="detectionImage">class <strong>detectionImage</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Class&nbsp;provides&nbsp;a&nbsp;<a href="#detectionImage">detectionImage</a>&nbsp;object&nbsp;with&nbsp;methods&nbsp;to&nbsp;create&nbsp;an<br>
optimally&nbsp;combined&nbsp;(chi_square?)&nbsp;image&nbsp;from&nbsp;an&nbsp;observation's&nbsp;fits&nbsp;files.<br>
The&nbsp;detection&nbsp;image&nbsp;is&nbsp;written&nbsp;to&nbsp;the&nbsp;observations&nbsp;Images&nbsp;directory.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="detectionImage-__init__"><strong>__init__</strong></a>(self, obs, delFilters<font color="#909090">=['G800L']</font>, excludefilt<font color="#909090">=None</font>, noContext<font color="#909090">=None</font>)</dt><dd><tt>constructor&nbsp;gets&nbsp;an&nbsp;Observation&nbsp;object&nbsp;(obs)&nbsp;from&nbsp;the&nbsp;pipeline.</tt></dd></dl>

<dl><dt><a name="detectionImage-getStats"><strong>getStats</strong></a>(self)</dt><dd><tt>Runs&nbsp;SExtractor&nbsp;with&nbsp;phoney&nbsp;pars&nbsp;to&nbsp;get&nbsp;noise&nbsp;and&nbsp;background&nbsp;stats.&nbsp;<br>
Now&nbsp;implement&nbsp;this&nbsp;using&nbsp;the&nbsp;Popen4&nbsp;class,&nbsp;which&nbsp;sends&nbsp;both&nbsp;stdout<br>
and&nbsp;stderr&nbsp;to&nbsp;the&nbsp;fromchild&nbsp;file&nbsp;object.&nbsp;&nbsp;We&nbsp;suppress&nbsp;stdout&nbsp;from&nbsp;<br>
SExtractor&nbsp;by&nbsp;shunting&nbsp;stuff&nbsp;to&nbsp;/dev/null&nbsp;via&nbsp;the&nbsp;par&nbsp;file,&nbsp;so&nbsp;we<br>
will&nbsp;only&nbsp;get&nbsp;stderr&nbsp;anyway,&nbsp;at&nbsp;least,&nbsp;in&nbsp;theory.&nbsp;&nbsp;The&nbsp;Popen3&nbsp;class<br>
or&nbsp;rather,&nbsp;the&nbsp;factory&nbsp;function&nbsp;is&nbsp;uses,&nbsp;popen3,&nbsp;has&nbsp;proved<br>
to&nbsp;be&nbsp;buggy&nbsp;at&nbsp;times,&nbsp;so&nbsp;this&nbsp;is&nbsp;an&nbsp;attempt&nbsp;to&nbsp;move&nbsp;away&nbsp;from&nbsp;it.</tt></dd></dl>

<dl><dt><a name="detectionImage-getinpar"><strong>getinpar</strong></a>(self, param)</dt><dd><tt>Returns&nbsp;value&nbsp;of&nbsp;input&nbsp;parameter&nbsp;given&nbsp;a&nbsp;parameter&nbsp;name</tt></dd></dl>

<dl><dt><a name="detectionImage-mkChi2Im"><strong>mkChi2Im</strong></a>(self)</dt><dd><tt>Make&nbsp;the&nbsp;detection&nbsp;image&nbsp;using&nbsp;Numeric&nbsp;package,&nbsp;not&nbsp;IRAF.<br>
This&nbsp;method&nbsp;creates&nbsp;the&nbsp;detection&nbsp;Image&nbsp;using&nbsp;the&nbsp;CHI^2&nbsp;algorithm.</tt></dd></dl>

<dl><dt><a name="detectionImage-mkInvarIm"><strong>mkInvarIm</strong></a>(self)</dt><dd><tt>Make&nbsp;the&nbsp;detection&nbsp;image&nbsp;using&nbsp;Numeric&nbsp;package,&nbsp;not&nbsp;IRAF.<br>
This&nbsp;method&nbsp;creates&nbsp;a&nbsp;detection&nbsp;image&nbsp;using&nbsp;the&nbsp;inverse&nbsp;variance<br>
algorithm.</tt></dd></dl>

<dl><dt><a name="detectionImage-mkIrafIm"><strong>mkIrafIm</strong></a>(self)</dt><dd><tt>make&nbsp;the&nbsp;detection&nbsp;image.&nbsp;&nbsp;This&nbsp;method&nbsp;creates&nbsp;the&nbsp;detection&nbsp;<br>
Image&nbsp;using&nbsp;the&nbsp;CHI^2&nbsp;algorithm.</tt></dd></dl>

<dl><dt><a name="detectionImage-mkMsg"><strong>mkMsg</strong></a>(self)</dt><dd><tt>create&nbsp;and&nbsp;write&nbsp;module&nbsp;level&nbsp;message&nbsp;for&nbsp;this&nbsp;class.<br>
Most&nbsp;of&nbsp;this&nbsp;is&nbsp;just&nbsp;compiling&nbsp;the&nbsp;info.&nbsp;meta&nbsp;is&nbsp;a&nbsp;dictionary<br>
of&nbsp;lists&nbsp;where&nbsp;each&nbsp;list&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;tuples&nbsp;describing&nbsp;the<br>
tag&nbsp;lines&nbsp;for&nbsp;the&nbsp;particular&nbsp;section&nbsp;of&nbsp;the&nbsp;message.&nbsp;&nbsp;This&nbsp;tuple&nbsp;<br>
format&nbsp;conforms&nbsp;to&nbsp;that&nbsp;used&nbsp;by&nbsp;the&nbsp;xmlMessage&nbsp;class&nbsp;which&nbsp;is<br>
modeled&nbsp;on&nbsp;basic&nbsp;python&nbsp;argument&nbsp;passing,&nbsp;i.e.&nbsp;(key,*value,**attr).</tt></dd></dl>

<dl><dt><a name="detectionImage-mkWghtIm"><strong>mkWghtIm</strong></a>(self, doMedFilt<font color="#909090">=0</font>, medfiltsize<font color="#909090">=5</font>)</dt><dd><tt>Makes&nbsp;the&nbsp;weight&nbsp;image&nbsp;to&nbsp;be&nbsp;used&nbsp;by&nbsp;Sextractor&nbsp;when&nbsp;finding<br>
sources&nbsp;in&nbsp;the&nbsp;(inverse&nbsp;variance-weighted)&nbsp;detection&nbsp;image.<br>
The&nbsp;method&nbsp;for&nbsp;constructing&nbsp;the&nbsp;weight&nbsp;image&nbsp;follows&nbsp;analogously<br>
to&nbsp;that&nbsp;used&nbsp;in&nbsp;making&nbsp;the&nbsp;(inverse-variance)&nbsp;detection&nbsp;image.</tt></dd></dl>

<dl><dt><a name="detectionImage-setinpar"><strong>setinpar</strong></a>(self, param, value)</dt><dd><tt>Sets&nbsp;value&nbsp;of&nbsp;input&nbsp;parameter&nbsp;given&nbsp;a&nbsp;parameter&nbsp;name&nbsp;and&nbsp;value</tt></dd></dl>

<dl><dt><a name="detectionImage-setpars"><strong>setpars</strong></a>(self)</dt><dd><tt>This&nbsp;method&nbsp;in&nbsp;this&nbsp;class&nbsp;generates&nbsp;a&nbsp;phoney&nbsp;(unimportant)&nbsp;.inpar&nbsp;file<br>
to&nbsp;run&nbsp;sextractor&nbsp;and&nbsp;get&nbsp;out&nbsp;the&nbsp;background&nbsp;and&nbsp;noise&nbsp;stats.</tt></dd></dl>

<dl><dt><a name="detectionImage-writeXml"><strong>writeXml</strong></a>(self)</dt><dd><tt>Mark&nbsp;up&nbsp;the&nbsp;detection&nbsp;Image&nbsp;produced&nbsp;by&nbsp;this&nbsp;module.</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="detectionImageError">class <strong>detectionImageError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="exceptions.html#Exception">Exception</a>&nbsp;raised&nbsp;in&nbsp;making&nbsp;detection&nbsp;image.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="detectionImageError-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>

<dl><dt><a name="detectionImageError-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="detectionImageError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>

<dl><dt><a name="detectionImageError-__str__"><strong>__str__</strong></a>(...)</dt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'K. Anderson &lt;anderson@pha.jhu.edu&gt;, J. Blakeslee'<br>
<strong>__version__</strong> = '1.22'<br>
<strong>__version_date__</strong> = '2006/07/21 20:15:45'<br>
<strong>iraf</strong> = &lt;module 'pyraf.iraf' from '/usr/lib/python2.4/site-packages/pyraf/iraf.pyc'&gt;<br>
<strong>pyversion</strong> = '2.4.3 (#1, Jan 14 2008, 18:32:40) <font color="#c040c0">\n</font>[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]'<br>
<strong>version</strong> = '2.4.3 (#1, Jan 14 2008, 18:32:40) <font color="#c040c0">\n</font>[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">K.&nbsp;Anderson&nbsp;&lt;anderson@pha.jhu.edu&gt;,&nbsp;J.&nbsp;Blakeslee</td></tr></table>
</body></html>